<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post(); ?>
			<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
			<p class="det">分类： <?php the_category(', ') ?> | 标签： <?php the_tags(''); ?> | 日期：<?php the_time('Y-m-d'); ?> <?php edit_post_link('编辑', '', ''); ?></p>
				<div id='cnt'>
                    <?php if(function_exists('wkc_random_posts')){?>
                    <div id="fr-rnd">
                        <div id='show-hide' class="btn">隐/显</div>
                        <div style="color:#ff6600;font-size:14px;font-weight:bold;margin-bottom:5px">你可能对这些也感兴趣</div>
                        <ul><?php wkc_random_posts('number=5&length=250'); ?></ul>
                        
                    </div>
                    <?php }?>
                    <?php the_content('Read the rest of this entry &raquo;'); ?>
                </div>

    <?php if(function_exists('wkc_most_commented_posts') && function_exists('rp_related_posts')){?>
    <div id='more-info'>
        <div id='most-comment-post'>
            <div class="intro-text">热评文章</div>
            <ul>
                <?php wkc_most_commented_posts('number=10&days=15&before=<li>&after=</li>'); ?>
            </ul>
        </div>

        <div id='related-post'>
            <div class="intro-text">相关文章</div>
            <ul>
                <?php
                    rp_related_posts('');
                ?>
            </ul>
        </div>
    </div>
    <?}?>
    <p class="clearfix"></p>

	<?php comments_template(); ?>
	<?php endwhile; ?>
		<p align="center"><?php next_posts_link('&laquo; Previous Entries') ?>   <?php previous_posts_link('Next Entries &raquo;') ?></p>
	<?php else : ?>
		<h2 align="center">Not Found</h2>
		<p align="center">Sorry, but you are looking for something that isn't here.</p>
	<?php endif; ?>
		</div>

<?php if(function_exists('wkc_random_posts')){?>
<script type="text/javascript">
    document.getElementById('show-hide').onclick = function()
    {
        dest = document.getElementById('fr-rnd').getElementsByTagName('ul')[0];
        if(dest.style.display == 'none')
        {
            dest.style.display = 'block';
        }
        else
        {
            dest.style.display = 'none';
        }
    }
</script>
<?php } ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
</body>
</html>



